<?php
namespace inkstones\base;

class Instance{
	private static $instance=null;
	private function __construct(){
		
	}
	
	private function __clone(){}
	
	public static function get_instance($class,$link='link'){
		$key=sha1($class.$link);
		if(!isset(self::$instance[$key])){
					self::$instance[$key]=new $class();
		}
		
		return self::$instance[$key];
	}
	
	protected function is_field($field){
		return !empty($field)?isset($this->$field)?true:false:false;
	}
}

















?>